﻿#ifndef NETPOINTDEVICE_H
#define NETPOINTDEVICE_H

#include <QMap>

#include "BaseDevice.h"
#include "Protocol/NetPointProtocol.h"
#include "Protocol/PointProtocol.h"
#include "Command/NetPointProtocol/NetControlPointCmd.h"
#include "Command/NetPointProtocol/NetElevatorAuthorizeCmd.h"
#include "Command/NetPointProtocol/NetElevatorToFirestCmd.h"
#include "Command/NetPointProtocol/NetElevatorCallsCmd.h"
#include "Command/NetPointProtocol/NetElevatorBackDataCmd.h"
#include "Function/ControlPointFunc.h"
#include "File/Xml/IPListXml.h"
#include "File/Xml/ElevatorIPXml.h"
#include "DataType/ElevatorStruct.h"
#include<QQueue>
class NetPointDevice : public BaseInterface<NetPointDevice>
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit NetPointDevice(QObject *parent = 0);

private:
    quint16 m_doorNumber;
    NetPointProtocol *netPointProtocol;
    PointProtocol *pointProtocol;
    QQueue <PortStruct> querydata;
    void controlPointCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void elevatorAutiorizeCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void controlPointFuncHandle(QSharedPointer<BaseFunc> sharedFunc);
    void UDPSetSwitchReply(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void elevatorToFirstCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void netElevatorCallsQueryHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void netElevatorCallsUPHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void netElevatorCallsDOWMHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void netElevatorBackDataHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
};


#endif // POINTDEVICE_H
